cmake_minimum_required(VERSION 3.16)
project(cmake-modules VERSION 1.0.0 LANGUAGES NONE)

include(src/nosal.cmake)

message(STATUS "Preferred Build Type:     ${CMAKE_BUILD_TYPE}")
message(STATUS "CXX_EXTENSIONS:           ${CMAKE_CXX_EXTENSIONS}")
message(STATUS "CXX_STANDARD:             ${CMAKE_CXX_STANDARD}")

include(GNUInstallDirs)

set(NOSAL_MODULES_DIR "${CMAKE_INSTALL_DATADIR}/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules/NOSAL" CACHE PATH "NOSAL CMake modules directory")

set(NOSAL_CMAKE_SOURCES
    src/nosal.cmake
    src/toolchain_qnx700_aarch64.cmake
)

install(FILES ${NOSAL_CMAKE_SOURCES}
    DESTINATION "${NOSAL_MODULES_DIR}"
)
